<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>资料详情</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <link rel="stylesheet" href="/static/wx/lib/sui/sm.min.css" />
    <link rel="stylesheet" href="/static/wx/lib/sui/sm-extend.min.css" />
    <link rel="stylesheet" href="/static/wx/css/reset.css" />
    <link rel="stylesheet" href="/static/wx/css/main.css" />
    <link rel="stylesheet" href="/static/wx/css/public_main.css" />
  </head>

  <body>
    <div class="page-group">
      <div class="page page-current" id="rep_data_no_audit">
        <!-- 主内容 -->
        <div class="content">
          <div class="item-card" style="padding:.5rem 0">
            <div class="item-card-header">状态：{$res.status_name}</div>
          </div>
          <div class="item-card">
            <div class="item-card-content">
              <div class="item-card-content-item">录入时间：{$res.created_at}</div>
            </div>
          </div>
          <div class="item-card">
            <div class="item-card-header">
              <div>保单险种</div>
              <!--{if(isset($data['join_price']))}-->
              <!--<div class="btn" onclick="return_msg(1,{$info.policy_num})">修改驳回原因</div>-->
              <!--{else}-->
              <!--<div class="btn" onclick="return_msg(1,{$info.policy_num})">驳回</div>-->
              <!--{/if}-->
            </div>
            <div class="item-card-content">
              <div class="item-card-content-item">保单号：{$info.report_num}</div>
              <div class="item-card-content-item">报案号：{$info.policy_num}</div>
              <div class="item-card-content-item flex">
                <div>出险险种：{$info.insurance_type |default = ''}</div>
              </div>
            </div>
            <!--<div class="edit-content">-->
              <!--{if(isset($data['join_price']))}-->
              <!--{foreach($data['join_price'] as $k =>$v)}-->
              <!--{if($v)}-->
              <!--<p>{$v}</p>-->
              <!--{/if}-->
              <!--{/foreach}-->
              <!--{/if}-->
            <!--</div>-->
          </div>
          <div class="item-card">
            <div class="item-card-header">
              <div>参与竞价</div>
              {if(isset($data['join_price']))}
              <div class="btn" onclick="return_msg(1,{$info.policy_num})">修改驳回原因</div>
              {else}
              <div class="btn" onclick="return_msg(1,{$info.policy_num})">驳回</div>
              {/if}
            </div>
            <div class="item-card-content">
              <div class="item-card-content-item">
                本人是否参与竞价拍卖：{if(isset($res.is_join))}{if($res.is_join == 1)}参与{else}不参与{/if}{/if}
              </div>
              <div class="item-card-content-item">
                参与竞价拍卖缴纳保证金：{if($res.is_promise == 1)}申请缴纳保证金{else}缴纳保证金{/if}
              </div>
              <div class="item-card-content-item">优先回购价格：{$res.back_price |default = ''} 元</div>
            </div>
            <div class="edit-content">
              {if(isset($data['join_price']))}
              {foreach($data['join_price'] as $k =>$v)}
              {if($v)}
              <p>{$v}</p>
              {/if}
              {/foreach}
              {/if}
            </div>
          </div>
          <div class="item-card">
            <div class="item-card-header">
              <div>看货信息</div>
              {if(isset($data['look_goods_info']))}
              <div class="btn" onclick="return_msg(2,{$info.policy_num})">修改驳回原因</div>
              {else}
              <div class="btn" onclick="return_msg(2,{$info.policy_num})">驳回</div>
              {/if}
            </div>
            <div class="item-card-content">
              <div class="item-card-content-item">看货要求：{if(isset($res.look_type))}{if($res.look_type == 1)}预约联系{elseif($res.look_type ==2)}随时看货{elseif($res.look_type ==3)}交纳保证金后看货{/if}{/if}</div>
              <div class="item-card-content-item" style="display:flex">
                <div>看货地址：</div>
                <div>
                  <div>{$res.province |default = ''}{$res.city |default = ''}{$res.town |default = ''}</div>
                  <div>{$res.address_detail |default = ''}</div>
                </div>
              </div>
              <div class="item-card-content-item">
                联系人：{$res.linkman |default = ''}
              </div>
              <div class="item-card-content-item">
                手机号：{$res.phone |default = ''}
              </div>
              <div class="item-card-content-item">
                备用联系人：{$res.second_phone |default = ''}
              </div>
            </div>
            <div class="edit-content">
              {if(isset($data['look_goods_info']))}
              {foreach($data['look_goods_info'] as $k =>$v)}
              {if($v)}
              <p>{$v}</p>
              {/if}
              {/foreach}
              {/if}
            </div>
          </div>
          <div class="item-card">
            <div class="item-card-header">
              <div>提货信息</div>
              {if(isset($data['bol_info']))}
              <div class="btn" onclick="return_msg(3,{$info.policy_num})">修改驳回原因</div>
              {else}
              <div class="btn" onclick="return_msg(3,{$info.policy_num})">驳回</div>
              {/if}
            </div>
            <div class="item-card-content">
              <div class="item-card-content-item">
                提货是否需要支付其他费用：{if(isset($res.is_pay))}{if($res.is_pay == 1)}是{/if}{if($res.is_pay == 2)}否{/if}{/if}
              </div>
              <!--<div class="item-card-content-item">包装费：200元</div>-->
              <!--<div class="item-card-content-item">储存费：200元</div>-->
              <div class="item-card-content-item">
                提货详细说明：{$res.pay_result |default = ''}
              </div>
              <div class="item-card-content-item" style="display:flex">
                <div>看货地址：</div>
                <div>
                  <div>{$res.bol_province |default = ''}{$res.bol_city |default = ''}{$res.bol_town |default = ''}</div>
                  <div>{$res.bol_address_detail |default = ''}</div>
                </div>
              </div>
              <div class="item-card-content-item">
                联系人：{$res.bol_linkman |default = ''}
              </div>
              <div class="item-card-content-item">
                手机号：{$res.bol_phone |default = ''}
              </div>
              <div class="item-card-content-item">
                提货时限：竞价拍卖后{$res.bol_days |default = ''} 天内提货
              </div>
            </div>
            <div class="edit-content">
              {if(isset($data['bol_info']))}
              {foreach($data['bol_info'] as $k =>$v)}
              {if($v)}
              <p>{$v}</p>
              {/if}
              {/foreach}
              {/if}
            </div>
          </div>
          <div class="item-card">
            <div class="item-card-header">
              <div>收款信息</div>
              {if(isset($data['receive_money']))}
              <div class="btn" onclick="return_msg(4,{$info.policy_num})">修改驳回原因</div>
              {else}
              <div class="btn" onclick="return_msg(4,{$info.policy_num})">驳回</div>
              {/if}
            </div>
            <div class="item-card-content">
              <div class="item-card-content-item">
                您的收款名称：{$res.pay_name |default = ''}
              </div>
              <div class="item-card-content-item">
                开户银行：{$res.bank_name |default = ''}
              </div>
              <div class="item-card-content-item">
                账号：{$res.card_num |default = ''}
              </div>
              <div class="item-card-content-item">
                税号：{$res.tax_num |default = ''}
              </div>
              <div class="item-card-content-item">
                地址：{$res.company_address |default = ''}
              </div>
            </div>
            <div class="edit-content">
              {if(isset($data['receive_money']))}
              {foreach($data['receive_money'] as $k =>$v)}
              {if($v)}
              <p>{$v}</p>
              {/if}
              {/foreach}
              {/if}
            </div>
          </div>
          <div class="item-card">
            <div class="item-card-header">
                <div>授权书</div>
              {if(isset($data['auth_report']))}
              <div class="btn" onclick="return_msg(5,{$info.policy_num})">修改驳回原因</div>
              {else}
              <div class="btn" onclick="return_msg(5,{$info.policy_num})">驳回</div>
              {/if}
            </div>
            <div class="item-card-content">
              <div
                class="item-card-content-item"
                style="display:flex;align-items:center;"
              >
                <div>授权书：</div>
                <div class="pre-view">
                  {if(isset($res.entrust_url))}
                  <ul class="uploader__files" id="uploaderFiles">
                    {foreach($res.entrust_url as $v)}
                    <li class="uploader__file" style="background-image:url({$v})" data="{$v}"></li>
                    {/foreach}
                  </ul>
                  {/if}
                </div>
              </div>
            </div>
            <div class="edit-content">
              {if(isset($data['auth_report']))}
              {foreach($data['auth_report'] as $k =>$v)}
              {if($v)}
              <p>{$v}</p>
              {/if}
              {/foreach}
              {/if}
            </div>
          </div>

          <div class="btn-box" style="margin-top: 1rem;">
            <div class="flex size-m">
              <div class="pre-step my-btn" style="width: 47%;">
                <input type="hidden" id="i_id" value="{$res.i_id | default=''}">
                <input type="hidden" id="policy_num" value="{$info.policy_num |default = ''}">
                <span id="return"
                  style="background-color: rgb(255, 255, 255); color:#e4393c;border:1px solid #e4393c;"
                  >提交驳回修改</span
                >
              </div>
              <div class="pre-step my-btn" style="width: 47%;">
                <span class="active" id="submit">确认通过</span>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <script
      type="text/javascript"
      src="/static/wx/lib/sui/zepto.min.js"
      charset="utf-8"
    ></script>
    <script
      type="text/javascript"
      src="/static/wx/lib/sui/sm.min.js"
      charset="utf-8"
    ></script>
    <script
      type="text/javascript"
      src="/static/wx/lib/sui/sm-extend.min.js"
      charset="utf-8"
    ></script>
  </body>
</html>
    <script type="text/javascript" src="/static/wx/layui/layui.js"></script>
<script>
    layui.use(['layer'], function(){
        $('.uploader__file').on('click',function(){
            var th=$(this);
            var img=th.attr('data');
            layer.open({
                type: 1,
                title: false,
                closeBtn: 0,
                area: '80%',
                skin: 'layui-layer-nobg', //没有背景色
                shadeClose: true,
                content:'<img src="'+img+'" style="width:100%;">'
            });
        });
    });

    function return_msg(type,policy_num){
        var i_id = $('#i_id').val();
        $.prompt('驳回原因',
            function (value) {
                $.ajax({
                    url:'/wx/saleman/getReturnMsg',
                    type:'post',
                    dataType:'json',
                    data:{
                        'i_id':i_id,
                        'type':type,
                        'msg':value,
                    },
                    success:function (data) {
                        if(data.code ==200){
                            window.location.href = '/wx/saleman/return_insurant?policy_num='+policy_num+'&is_show=2';
                        }else{
                            $.alert(data.msg);
                        }
                    }
                });
            },
            function (value) {

            }
        );
    }



    $('#submit').on('touchend',function() {
        var i_id = $('#i_id').val();
            $.ajax({
                url:'/wx/saleman/return_commit',
                type:'post',
                dataType:'json',
                data:{
                    'i_id':i_id,
                },
                success:function (data) {
                    if(data.code ==200){
                        $.alert('操作成功');
                        window.location.href = '/wx/saleman/index?type=2';
                    }else{
                        $.alert(data.msg);
                    }
                }
            });
    });


    $('#return').on('touchend',function() {
        var i_id = $('#i_id').val();
        $.confirm('未提交驳回原因，不予提交','提示',
            function () {
                $.ajax({
                    url:'/wx/saleman/return_save',
                    type:'post',
                    dataType:'json',
                    data:{
                        'i_id':i_id,
                    },
                    success:function (data) {
                        if(data.code ==200){
                            $.alert('修改成功');
                            window.location.href = '/wx/saleman/index?type=2';
                        }else{
                            $.alert(data.msg);
                        }
                    }
                });
            },
            function () {
                return false;
            }
        );
    });


</script>